package org.moda.sql.visitor;

import net.sf.jsqlparser.schema.Table;
import net.sf.jsqlparser.statement.select.FromItem;

/**
 * @ClassName: TableItemVisitor
 * @Description:
 * @Author: xuanyang
 * @Date: 2024-11-24 23:51
 * @Version: 1.0
 **/
public class TableVisitor {
    public static String tableName(FromItem fromItem) {
        if (fromItem instanceof Table) {
            return ((Table) fromItem).getName();
        }

        return "";
    }
}
